package com.trace.app.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 角色表(Role)表实体类
 *
 * @author lionkliu
 * @since 2024-03-31 09:54:47
 */
@SuppressWarnings("serial")
@Data
@TableName("sys_role")
@NoArgsConstructor
public class Role implements Serializable {

    @TableId
    private Integer id;

    private String name;
    //角色权限字符串
    @TableField(value = "`key`")
    private String key;
    //角色状态（0正常 1停用）
    private String status;
    //del_flag
    private Integer delFlag;
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    //备注
    private String remark;


}
